package com.itheima.controller;

import com.itheima.R;
import com.itheima.pojo.CmsPrefrenceArea;
import com.itheima.pojo.CmsSubject;
import com.itheima.service.CmsPrefrenceAreaService;
import com.itheima.vo.PageResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 袁鹏
 * @date 2022-10-14-8:06
 */
@RestController
@RequestMapping("/prefrenceArea")
public class CmsPrefrenceAreaController {

    @Autowired
    private CmsPrefrenceAreaService cmsPrefrenceAreaService;


    /**
     * 获取所有商品优选
     */
    @GetMapping("/listAll")
    public R listAll(){
        List<CmsPrefrenceArea> prefrenceAreaList = cmsPrefrenceAreaService.listAll();
        return R.success(prefrenceAreaList);
    }

}
